<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span id="local-6989586621679580638"><span id="local-6989586621679580639"><span id="local-6989586621679580640"></span></span></span><span class="hs-pragma">{-# LANGUAGE DeriveDataTypeable #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE DeriveGeneric #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# LANGUAGE PolyKinds #-}</span><span>
</span><span id="line-4"></span><span class="hs-pragma">{-# LANGUAGE Safe #-}</span><span>
</span><span id="line-5"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- Module      :  Data.Functor.Sum</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- Copyright   :  (c) Ross Paterson 2014</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- License     :  BSD-style (see the file LICENSE)</span><span>
</span><span id="line-10"></span><span class="hs-comment">--</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Maintainer  :  libraries@haskell.org</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- Stability   :  experimental</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-14"></span><span class="hs-comment">--</span><span>
</span><span id="line-15"></span><span class="hs-comment">-- Sums, lifted to functors.</span><span>
</span><span id="line-16"></span><span class="hs-comment">--</span><span>
</span><span id="line-17"></span><span class="hs-comment">-- @since 4.9.0.0</span><span>
</span><span id="line-18"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-19"></span><span>
</span><span id="line-20"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Data.Functor.Sum</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-21"></span><span>    </span><span class="annot"><a href="Data.Functor.Sum.html#Sum"><span class="hs-identifier">Sum</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-22"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-23"></span><span>
</span><span id="line-24"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Control.Applicative.html"><span class="hs-identifier">Control.Applicative</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Base.html#%3C%7C%3E"><span class="hs-operator">(&lt;|&gt;)</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-25"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Data.html"><span class="hs-identifier">Data.Data</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Data.html#Data"><span class="hs-identifier">Data</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-26"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Functor.Classes.html"><span class="hs-identifier">Data.Functor.Classes</span></a></span><span>
</span><span id="line-27"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Generics.html"><span class="hs-identifier">GHC.Generics</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Generics.html#Generic"><span class="hs-identifier">Generic</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Generics.html#Generic1"><span class="hs-identifier">Generic1</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-28"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Text.Read.html"><span class="hs-identifier">Text.Read</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Read.html#Read"><span class="hs-identifier">Read</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Read.html#readListDefault"><span class="hs-identifier">readListDefault</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Read.html#readListPrecDefault"><span class="hs-identifier">readListPrecDefault</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-29"></span><span>
</span><span id="line-30"></span><span class="hs-comment">-- | Lifted sum of functors.</span><span>
</span><span id="line-31"></span><span id="local-6989586621679580631"><span id="local-6989586621679580632"><span id="local-6989586621679580633"><span id="local-6989586621679580634"></span></span></span></span><span class="hs-keyword">data</span><span> </span><span id="Sum"><span class="annot"><a href="Data.Functor.Sum.html#Sum"><span class="hs-identifier hs-var">Sum</span></a></span></span><span> </span><span id="local-6989586621679580892"><span class="annot"><a href="#local-6989586621679580892"><span class="hs-identifier hs-type">f</span></a></span></span><span> </span><span id="local-6989586621679580891"><span class="annot"><a href="#local-6989586621679580891"><span class="hs-identifier hs-type">g</span></a></span></span><span> </span><span id="local-6989586621679580893"><span class="annot"><a href="#local-6989586621679580893"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="InL"><span class="annot"><a href="Data.Functor.Sum.html#InL"><span class="hs-identifier hs-var">InL</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679580892"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580893"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="InR"><span class="annot"><a href="Data.Functor.Sum.html#InR"><span class="hs-identifier hs-var">InR</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679580891"><span class="hs-identifier hs-type">g</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580893"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-32"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span> </span><span id="local-6989586621679580594"><span id="local-6989586621679580596"><span id="local-6989586621679580598"><span id="local-6989586621679580600"><span id="local-6989586621679580602"><span id="local-6989586621679580604"><span id="local-6989586621679580606"><span id="local-6989586621679580608"><span id="local-6989586621679580610"><span id="local-6989586621679580612"><span id="local-6989586621679580614"><span id="local-6989586621679580616"><span id="local-6989586621679580620"><span id="local-6989586621679580624"><span class="annot"><span class="annottext">Typeable (Sum f g a)
Typeable (Sum f g a)
-&gt; (forall (c :: * -&gt; *).
    (forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
    -&gt; (forall g. g -&gt; c g) -&gt; Sum f g a -&gt; c (Sum f g a))
-&gt; (forall (c :: * -&gt; *).
    (forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
    -&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c (Sum f g a))
-&gt; (Sum f g a -&gt; Constr)
-&gt; (Sum f g a -&gt; DataType)
-&gt; (forall (t :: * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d. Data d =&gt; c (t d)) -&gt; Maybe (c (Sum f g a)))
-&gt; (forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d e. (Data d, Data e) =&gt; c (t d e))
    -&gt; Maybe (c (Sum f g a)))
-&gt; ((forall b. Data b =&gt; b -&gt; b) -&gt; Sum f g a -&gt; Sum f g a)
-&gt; (forall r r'.
    (r -&gt; r' -&gt; r)
    -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; Sum f g a -&gt; r)
-&gt; (forall r r'.
    (r' -&gt; r -&gt; r)
    -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; Sum f g a -&gt; r)
-&gt; (forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; Sum f g a -&gt; [u])
-&gt; (forall u.
    Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; Sum f g a -&gt; u)
-&gt; (forall (m :: * -&gt; *).
    Monad m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; Sum f g a -&gt; m (Sum f g a))
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; Sum f g a -&gt; m (Sum f g a))
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; Sum f g a -&gt; m (Sum f g a))
-&gt; Data (Sum f g a)
Sum f g a -&gt; Constr
Sum f g a -&gt; DataType
(forall b. Data b =&gt; b -&gt; b) -&gt; Sum f g a -&gt; Sum f g a
forall a.
Typeable a
-&gt; (forall (c :: * -&gt; *).
    (forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
    -&gt; (forall g. g -&gt; c g) -&gt; a -&gt; c a)
-&gt; (forall (c :: * -&gt; *).
    (forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
    -&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c a)
-&gt; (a -&gt; Constr)
-&gt; (a -&gt; DataType)
-&gt; (forall (t :: * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d. Data d =&gt; c (t d)) -&gt; Maybe (c a))
-&gt; (forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d e. (Data d, Data e) =&gt; c (t d e)) -&gt; Maybe (c a))
-&gt; ((forall b. Data b =&gt; b -&gt; b) -&gt; a -&gt; a)
-&gt; (forall r r'.
    (r -&gt; r' -&gt; r) -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; a -&gt; r)
-&gt; (forall r r'.
    (r' -&gt; r -&gt; r) -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; a -&gt; r)
-&gt; (forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; a -&gt; [u])
-&gt; (forall u. Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; a -&gt; u)
-&gt; (forall (m :: * -&gt; *).
    Monad m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; Data a
forall u. Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; Sum f g a -&gt; u
forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; Sum f g a -&gt; [u]
forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; Sum f g a -&gt; r
forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; Sum f g a -&gt; r
forall {k} {f :: k -&gt; *} {g :: k -&gt; *} {a :: k}.
(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a),
 Data (g a)) =&gt;
Typeable (Sum f g a)
forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k).
(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a),
 Data (g a)) =&gt;
Sum f g a -&gt; Constr
forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k).
(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a),
 Data (g a)) =&gt;
Sum f g a -&gt; DataType
forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k).
(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a),
 Data (g a)) =&gt;
(forall b. Data b =&gt; b -&gt; b) -&gt; Sum f g a -&gt; Sum f g a
forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k) u.
(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a),
 Data (g a)) =&gt;
Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; Sum f g a -&gt; u
forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k) u.
(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a),
 Data (g a)) =&gt;
(forall d. Data d =&gt; d -&gt; u) -&gt; Sum f g a -&gt; [u]
forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k) r r'.
(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a),
 Data (g a)) =&gt;
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; Sum f g a -&gt; r
forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k) r r'.
(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a),
 Data (g a)) =&gt;
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; Sum f g a -&gt; r
forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k) (m :: * -&gt; *).
(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a),
 Data (g a), Monad m) =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; Sum f g a -&gt; m (Sum f g a)
forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k) (m :: * -&gt; *).
(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a),
 Data (g a), MonadPlus m) =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; Sum f g a -&gt; m (Sum f g a)
forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k) (c :: * -&gt; *).
(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a),
 Data (g a)) =&gt;
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c (Sum f g a)
forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k) (c :: * -&gt; *).
(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a),
 Data (g a)) =&gt;
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; Sum f g a -&gt; c (Sum f g a)
forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k) (t :: * -&gt; *)
       (c :: * -&gt; *).
(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a),
 Data (g a), Typeable t) =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c (Sum f g a))
forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k) (t :: * -&gt; * -&gt; *)
       (c :: * -&gt; *).
(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a),
 Data (g a), Typeable t) =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e))
-&gt; Maybe (c (Sum f g a))
forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; Sum f g a -&gt; m (Sum f g a)
forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; Sum f g a -&gt; m (Sum f g a)
forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c (Sum f g a)
forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; Sum f g a -&gt; c (Sum f g a)
forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c (Sum f g a))
forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e))
-&gt; Maybe (c (Sum f g a))
gmapMo :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; Sum f g a -&gt; m (Sum f g a)
$cgmapMo :: forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k) (m :: * -&gt; *).
(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a),
 Data (g a), MonadPlus m) =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; Sum f g a -&gt; m (Sum f g a)
gmapMp :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; Sum f g a -&gt; m (Sum f g a)
$cgmapMp :: forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k) (m :: * -&gt; *).
(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a),
 Data (g a), MonadPlus m) =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; Sum f g a -&gt; m (Sum f g a)
gmapM :: forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; Sum f g a -&gt; m (Sum f g a)
$cgmapM :: forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k) (m :: * -&gt; *).
(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a),
 Data (g a), Monad m) =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; Sum f g a -&gt; m (Sum f g a)
gmapQi :: forall u. Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; Sum f g a -&gt; u
$cgmapQi :: forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k) u.
(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a),
 Data (g a)) =&gt;
Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; Sum f g a -&gt; u
gmapQ :: forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; Sum f g a -&gt; [u]
$cgmapQ :: forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k) u.
(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a),
 Data (g a)) =&gt;
(forall d. Data d =&gt; d -&gt; u) -&gt; Sum f g a -&gt; [u]
gmapQr :: forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; Sum f g a -&gt; r
$cgmapQr :: forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k) r r'.
(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a),
 Data (g a)) =&gt;
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; Sum f g a -&gt; r
gmapQl :: forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; Sum f g a -&gt; r
$cgmapQl :: forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k) r r'.
(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a),
 Data (g a)) =&gt;
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; Sum f g a -&gt; r
gmapT :: (forall b. Data b =&gt; b -&gt; b) -&gt; Sum f g a -&gt; Sum f g a
$cgmapT :: forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k).
(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a),
 Data (g a)) =&gt;
(forall b. Data b =&gt; b -&gt; b) -&gt; Sum f g a -&gt; Sum f g a
dataCast2 :: forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e))
-&gt; Maybe (c (Sum f g a))
$cdataCast2 :: forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k) (t :: * -&gt; * -&gt; *)
       (c :: * -&gt; *).
(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a),
 Data (g a), Typeable t) =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e))
-&gt; Maybe (c (Sum f g a))
dataCast1 :: forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c (Sum f g a))
$cdataCast1 :: forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k) (t :: * -&gt; *)
       (c :: * -&gt; *).
(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a),
 Data (g a), Typeable t) =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c (Sum f g a))
dataTypeOf :: Sum f g a -&gt; DataType
$cdataTypeOf :: forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k).
(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a),
 Data (g a)) =&gt;
Sum f g a -&gt; DataType
toConstr :: Sum f g a -&gt; Constr
$ctoConstr :: forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k).
(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a),
 Data (g a)) =&gt;
Sum f g a -&gt; Constr
gunfold :: forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c (Sum f g a)
$cgunfold :: forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k) (c :: * -&gt; *).
(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a),
 Data (g a)) =&gt;
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c (Sum f g a)
gfoldl :: forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; Sum f g a -&gt; c (Sum f g a)
$cgfoldl :: forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k) (c :: * -&gt; *).
(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a),
 Data (g a)) =&gt;
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; Sum f g a -&gt; c (Sum f g a)
</span><a href="Data.Data.html#Data"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Data</span></a></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span>     </span><span class="hs-comment">-- ^ @since 4.9.0.0</span><span>
</span><span id="line-33"></span><span>           </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(forall x. Sum f g a -&gt; Rep (Sum f g a) x)
-&gt; (forall x. Rep (Sum f g a) x -&gt; Sum f g a)
-&gt; Generic (Sum f g a)
forall x. Rep (Sum f g a) x -&gt; Sum f g a
forall x. Sum f g a -&gt; Rep (Sum f g a) x
forall a.
(forall x. a -&gt; Rep a x) -&gt; (forall x. Rep a x -&gt; a) -&gt; Generic a
forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k) x.
Rep (Sum f g a) x -&gt; Sum f g a
forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k) x.
Sum f g a -&gt; Rep (Sum f g a) x
$cto :: forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k) x.
Rep (Sum f g a) x -&gt; Sum f g a
$cfrom :: forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k) x.
Sum f g a -&gt; Rep (Sum f g a) x
</span><a href="GHC.Generics.html#Generic"><span class="hs-identifier hs-var hs-var hs-var hs-var">Generic</span></a></span><span>  </span><span class="hs-comment">-- ^ @since 4.9.0.0</span><span>
</span><span id="line-34"></span><span>           </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(forall (a :: k). Sum f g a -&gt; Rep1 (Sum f g) a)
-&gt; (forall (a :: k). Rep1 (Sum f g) a -&gt; Sum f g a)
-&gt; Generic1 (Sum f g)
forall (a :: k). Rep1 (Sum f g) a -&gt; Sum f g a
forall (a :: k). Sum f g a -&gt; Rep1 (Sum f g) a
forall k (f :: k -&gt; *).
(forall (a :: k). f a -&gt; Rep1 f a)
-&gt; (forall (a :: k). Rep1 f a -&gt; f a) -&gt; Generic1 f
forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k).
Rep1 (Sum f g) a -&gt; Sum f g a
forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k).
Sum f g a -&gt; Rep1 (Sum f g) a
$cto1 :: forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k).
Rep1 (Sum f g) a -&gt; Sum f g a
$cfrom1 :: forall k (f :: k -&gt; *) (g :: k -&gt; *) (a :: k).
Sum f g a -&gt; Rep1 (Sum f g) a
</span><a href="GHC.Generics.html#Generic1"><span class="hs-identifier hs-var hs-var hs-var hs-var">Generic1</span></a></span><span> </span><span class="hs-comment">-- ^ @since 4.9.0.0</span><span>
</span><span id="line-35"></span><span>           </span><span class="hs-special">)</span><span>
</span><span id="line-36"></span><span>
</span><span id="line-37"></span><span class="hs-comment">-- | @since 4.9.0.0</span><span>
</span><span id="line-38"></span><span id="local-6989586621679580880"><span id="local-6989586621679580881"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Classes.html#Eq1"><span class="hs-identifier hs-type">Eq1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580881"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Functor.Classes.html#Eq1"><span class="hs-identifier hs-type">Eq1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580880"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Functor.Classes.html#Eq1"><span class="hs-identifier hs-type">Eq1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#Sum"><span class="hs-identifier hs-type">Sum</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580881"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580880"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-39"></span><span>    </span><span id="local-6989586621679580575"><span class="annot"><span class="annottext">liftEq :: forall a b. (a -&gt; b -&gt; Bool) -&gt; Sum f g a -&gt; Sum f g b -&gt; Bool
</span><a href="Data.Functor.Classes.html#liftEq"><span class="hs-identifier hs-var hs-var hs-var hs-var">liftEq</span></a></span></span><span> </span><span id="local-6989586621679580573"><span class="annot"><span class="annottext">a -&gt; b -&gt; Bool
</span><a href="#local-6989586621679580573"><span class="hs-identifier hs-var">eq</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#InL"><span class="hs-identifier hs-type">InL</span></a></span><span> </span><span id="local-6989586621679580572"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679580572"><span class="hs-identifier hs-var">x1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#InL"><span class="hs-identifier hs-type">InL</span></a></span><span> </span><span id="local-6989586621679580571"><span class="annot"><span class="annottext">f b
</span><a href="#local-6989586621679580571"><span class="hs-identifier hs-var">x2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; Bool) -&gt; f a -&gt; f b -&gt; Bool
forall (f :: * -&gt; *) a b.
Eq1 f =&gt;
(a -&gt; b -&gt; Bool) -&gt; f a -&gt; f b -&gt; Bool
</span><a href="Data.Functor.Classes.html#liftEq"><span class="hs-identifier hs-var">liftEq</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; Bool
</span><a href="#local-6989586621679580573"><span class="hs-identifier hs-var">eq</span></a></span><span> </span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679580572"><span class="hs-identifier hs-var">x1</span></a></span><span> </span><span class="annot"><span class="annottext">f b
</span><a href="#local-6989586621679580571"><span class="hs-identifier hs-var">x2</span></a></span><span>
</span><span id="line-40"></span><span>    </span><span class="annot"><a href="Data.Functor.Classes.html#liftEq"><span class="hs-identifier hs-var">liftEq</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#InL"><span class="hs-identifier hs-type">InL</span></a></span><span> </span><span class="annot"><span class="annottext">f a
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#InR"><span class="hs-identifier hs-type">InR</span></a></span><span> </span><span class="annot"><span class="annottext">g b
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-41"></span><span>    </span><span class="annot"><a href="Data.Functor.Classes.html#liftEq"><span class="hs-identifier hs-var">liftEq</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#InR"><span class="hs-identifier hs-type">InR</span></a></span><span> </span><span class="annot"><span class="annottext">g a
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#InL"><span class="hs-identifier hs-type">InL</span></a></span><span> </span><span class="annot"><span class="annottext">f b
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-42"></span><span>    </span><span class="annot"><a href="Data.Functor.Classes.html#liftEq"><span class="hs-identifier hs-var">liftEq</span></a></span><span> </span><span id="local-6989586621679580570"><span class="annot"><span class="annottext">a -&gt; b -&gt; Bool
</span><a href="#local-6989586621679580570"><span class="hs-identifier hs-var">eq</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#InR"><span class="hs-identifier hs-type">InR</span></a></span><span> </span><span id="local-6989586621679580569"><span class="annot"><span class="annottext">g a
</span><a href="#local-6989586621679580569"><span class="hs-identifier hs-var">y1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#InR"><span class="hs-identifier hs-type">InR</span></a></span><span> </span><span id="local-6989586621679580568"><span class="annot"><span class="annottext">g b
</span><a href="#local-6989586621679580568"><span class="hs-identifier hs-var">y2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; Bool) -&gt; g a -&gt; g b -&gt; Bool
forall (f :: * -&gt; *) a b.
Eq1 f =&gt;
(a -&gt; b -&gt; Bool) -&gt; f a -&gt; f b -&gt; Bool
</span><a href="Data.Functor.Classes.html#liftEq"><span class="hs-identifier hs-var">liftEq</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; Bool
</span><a href="#local-6989586621679580570"><span class="hs-identifier hs-var">eq</span></a></span><span> </span><span class="annot"><span class="annottext">g a
</span><a href="#local-6989586621679580569"><span class="hs-identifier hs-var">y1</span></a></span><span> </span><span class="annot"><span class="annottext">g b
</span><a href="#local-6989586621679580568"><span class="hs-identifier hs-var">y2</span></a></span></span></span><span>
</span><span id="line-43"></span><span>
</span><span id="line-44"></span><span class="hs-comment">-- | @since 4.9.0.0</span><span>
</span><span id="line-45"></span><span id="local-6989586621679580871"><span id="local-6989586621679580872"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Classes.html#Ord1"><span class="hs-identifier hs-type">Ord1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580872"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Functor.Classes.html#Ord1"><span class="hs-identifier hs-type">Ord1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580871"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Functor.Classes.html#Ord1"><span class="hs-identifier hs-type">Ord1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#Sum"><span class="hs-identifier hs-type">Sum</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580872"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580871"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-46"></span><span>    </span><span id="local-6989586621679580556"><span class="annot"><span class="annottext">liftCompare :: forall a b.
(a -&gt; b -&gt; Ordering) -&gt; Sum f g a -&gt; Sum f g b -&gt; Ordering
</span><a href="Data.Functor.Classes.html#liftCompare"><span class="hs-identifier hs-var hs-var hs-var hs-var">liftCompare</span></a></span></span><span> </span><span id="local-6989586621679580554"><span class="annot"><span class="annottext">a -&gt; b -&gt; Ordering
</span><a href="#local-6989586621679580554"><span class="hs-identifier hs-var">comp</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#InL"><span class="hs-identifier hs-type">InL</span></a></span><span> </span><span id="local-6989586621679580553"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679580553"><span class="hs-identifier hs-var">x1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#InL"><span class="hs-identifier hs-type">InL</span></a></span><span> </span><span id="local-6989586621679580552"><span class="annot"><span class="annottext">f b
</span><a href="#local-6989586621679580552"><span class="hs-identifier hs-var">x2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; Ordering) -&gt; f a -&gt; f b -&gt; Ordering
forall (f :: * -&gt; *) a b.
Ord1 f =&gt;
(a -&gt; b -&gt; Ordering) -&gt; f a -&gt; f b -&gt; Ordering
</span><a href="Data.Functor.Classes.html#liftCompare"><span class="hs-identifier hs-var">liftCompare</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; Ordering
</span><a href="#local-6989586621679580554"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679580553"><span class="hs-identifier hs-var">x1</span></a></span><span> </span><span class="annot"><span class="annottext">f b
</span><a href="#local-6989586621679580552"><span class="hs-identifier hs-var">x2</span></a></span><span>
</span><span id="line-47"></span><span>    </span><span class="annot"><a href="Data.Functor.Classes.html#liftCompare"><span class="hs-identifier hs-var">liftCompare</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; Ordering
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#InL"><span class="hs-identifier hs-type">InL</span></a></span><span> </span><span class="annot"><span class="annottext">f a
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#InR"><span class="hs-identifier hs-type">InR</span></a></span><span> </span><span class="annot"><span class="annottext">g b
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#LT"><span class="hs-identifier hs-var">LT</span></a></span><span>
</span><span id="line-48"></span><span>    </span><span class="annot"><a href="Data.Functor.Classes.html#liftCompare"><span class="hs-identifier hs-var">liftCompare</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; Ordering
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#InR"><span class="hs-identifier hs-type">InR</span></a></span><span> </span><span class="annot"><span class="annottext">g a
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#InL"><span class="hs-identifier hs-type">InL</span></a></span><span> </span><span class="annot"><span class="annottext">f b
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#GT"><span class="hs-identifier hs-var">GT</span></a></span><span>
</span><span id="line-49"></span><span>    </span><span class="annot"><a href="Data.Functor.Classes.html#liftCompare"><span class="hs-identifier hs-var">liftCompare</span></a></span><span> </span><span id="local-6989586621679580551"><span class="annot"><span class="annottext">a -&gt; b -&gt; Ordering
</span><a href="#local-6989586621679580551"><span class="hs-identifier hs-var">comp</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#InR"><span class="hs-identifier hs-type">InR</span></a></span><span> </span><span id="local-6989586621679580550"><span class="annot"><span class="annottext">g a
</span><a href="#local-6989586621679580550"><span class="hs-identifier hs-var">y1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#InR"><span class="hs-identifier hs-type">InR</span></a></span><span> </span><span id="local-6989586621679580549"><span class="annot"><span class="annottext">g b
</span><a href="#local-6989586621679580549"><span class="hs-identifier hs-var">y2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; Ordering) -&gt; g a -&gt; g b -&gt; Ordering
forall (f :: * -&gt; *) a b.
Ord1 f =&gt;
(a -&gt; b -&gt; Ordering) -&gt; f a -&gt; f b -&gt; Ordering
</span><a href="Data.Functor.Classes.html#liftCompare"><span class="hs-identifier hs-var">liftCompare</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; Ordering
</span><a href="#local-6989586621679580551"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="annot"><span class="annottext">g a
</span><a href="#local-6989586621679580550"><span class="hs-identifier hs-var">y1</span></a></span><span> </span><span class="annot"><span class="annottext">g b
</span><a href="#local-6989586621679580549"><span class="hs-identifier hs-var">y2</span></a></span></span></span><span>
</span><span id="line-50"></span><span>
</span><span id="line-51"></span><span class="hs-comment">-- | @since 4.9.0.0</span><span>
</span><span id="line-52"></span><span id="local-6989586621679580860"><span id="local-6989586621679580861"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679580547"><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Classes.html#Read1"><span class="hs-identifier hs-type">Read1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580861"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Functor.Classes.html#Read1"><span class="hs-identifier hs-type">Read1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580860"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Functor.Classes.html#Read1"><span class="hs-identifier hs-type">Read1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#Sum"><span class="hs-identifier hs-type">Sum</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580861"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580860"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-53"></span><span>    </span><span id="local-6989586621679580538"><span class="annot"><span class="annottext">liftReadPrec :: forall a. ReadPrec a -&gt; ReadPrec [a] -&gt; ReadPrec (Sum f g a)
</span><a href="Data.Functor.Classes.html#liftReadPrec"><span class="hs-identifier hs-var hs-var hs-var hs-var">liftReadPrec</span></a></span></span><span> </span><span id="local-6989586621679580536"><span class="annot"><span class="annottext">ReadPrec a
</span><a href="#local-6989586621679580536"><span class="hs-identifier hs-var">rp</span></a></span></span><span> </span><span id="local-6989586621679580535"><span class="annot"><span class="annottext">ReadPrec [a]
</span><a href="#local-6989586621679580535"><span class="hs-identifier hs-var">rl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ReadPrec (Sum f g a) -&gt; ReadPrec (Sum f g a)
forall a. ReadPrec a -&gt; ReadPrec a
</span><a href="Data.Functor.Classes.html#readData"><span class="hs-identifier hs-var">readData</span></a></span><span> </span><span class="annot"><span class="annottext">(ReadPrec (Sum f g a) -&gt; ReadPrec (Sum f g a))
-&gt; ReadPrec (Sum f g a) -&gt; ReadPrec (Sum f g a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-54"></span><span>        </span><span class="annot"><span class="annottext">ReadPrec (f a)
-&gt; String -&gt; (f a -&gt; Sum f g a) -&gt; ReadPrec (Sum f g a)
forall a t. ReadPrec a -&gt; String -&gt; (a -&gt; t) -&gt; ReadPrec t
</span><a href="Data.Functor.Classes.html#readUnaryWith"><span class="hs-identifier hs-var">readUnaryWith</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ReadPrec a -&gt; ReadPrec [a] -&gt; ReadPrec (f a)
forall (f :: * -&gt; *) a.
Read1 f =&gt;
ReadPrec a -&gt; ReadPrec [a] -&gt; ReadPrec (f a)
</span><a href="Data.Functor.Classes.html#liftReadPrec"><span class="hs-identifier hs-var">liftReadPrec</span></a></span><span> </span><span class="annot"><span class="annottext">ReadPrec a
</span><a href="#local-6989586621679580536"><span class="hs-identifier hs-var">rp</span></a></span><span> </span><span class="annot"><span class="annottext">ReadPrec [a]
</span><a href="#local-6989586621679580535"><span class="hs-identifier hs-var">rl</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;InL&quot;</span></span><span> </span><span class="annot"><span class="annottext">f a -&gt; Sum f g a
forall {k} (f :: k -&gt; *) (g :: k -&gt; *) (a :: k). f a -&gt; Sum f g a
</span><a href="Data.Functor.Sum.html#InL"><span class="hs-identifier hs-var">InL</span></a></span><span> </span><span class="annot"><span class="annottext">ReadPrec (Sum f g a)
-&gt; ReadPrec (Sum f g a) -&gt; ReadPrec (Sum f g a)
forall (f :: * -&gt; *) a. Alternative f =&gt; f a -&gt; f a -&gt; f a
</span><a href="GHC.Base.html#%3C%7C%3E"><span class="hs-operator hs-var">&lt;|&gt;</span></a></span><span>
</span><span id="line-55"></span><span>        </span><span class="annot"><span class="annottext">ReadPrec (g a)
-&gt; String -&gt; (g a -&gt; Sum f g a) -&gt; ReadPrec (Sum f g a)
forall a t. ReadPrec a -&gt; String -&gt; (a -&gt; t) -&gt; ReadPrec t
</span><a href="Data.Functor.Classes.html#readUnaryWith"><span class="hs-identifier hs-var">readUnaryWith</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ReadPrec a -&gt; ReadPrec [a] -&gt; ReadPrec (g a)
forall (f :: * -&gt; *) a.
Read1 f =&gt;
ReadPrec a -&gt; ReadPrec [a] -&gt; ReadPrec (f a)
</span><a href="Data.Functor.Classes.html#liftReadPrec"><span class="hs-identifier hs-var">liftReadPrec</span></a></span><span> </span><span class="annot"><span class="annottext">ReadPrec a
</span><a href="#local-6989586621679580536"><span class="hs-identifier hs-var">rp</span></a></span><span> </span><span class="annot"><span class="annottext">ReadPrec [a]
</span><a href="#local-6989586621679580535"><span class="hs-identifier hs-var">rl</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;InR&quot;</span></span><span> </span><span class="annot"><span class="annottext">g a -&gt; Sum f g a
forall {k} (f :: k -&gt; *) (g :: k -&gt; *) (a :: k). g a -&gt; Sum f g a
</span><a href="Data.Functor.Sum.html#InR"><span class="hs-identifier hs-var">InR</span></a></span><span>
</span><span id="line-56"></span><span>
</span><span id="line-57"></span><span>    </span><span id="local-6989586621679580531"><span class="annot"><span class="annottext">liftReadListPrec :: forall a. ReadPrec a -&gt; ReadPrec [a] -&gt; ReadPrec [Sum f g a]
</span><a href="Data.Functor.Classes.html#liftReadListPrec"><span class="hs-identifier hs-var hs-var hs-var hs-var">liftReadListPrec</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ReadPrec a -&gt; ReadPrec [a] -&gt; ReadPrec [Sum f g a]
forall (f :: * -&gt; *) a.
Read1 f =&gt;
ReadPrec a -&gt; ReadPrec [a] -&gt; ReadPrec [f a]
</span><a href="Data.Functor.Classes.html#liftReadListPrecDefault"><span class="hs-identifier hs-var">liftReadListPrecDefault</span></a></span><span>
</span><span id="line-58"></span><span>    </span><span id="local-6989586621679580527"><span class="annot"><span class="annottext">liftReadList :: forall a. (Int -&gt; ReadS a) -&gt; ReadS [a] -&gt; ReadS [Sum f g a]
</span><a href="Data.Functor.Classes.html#liftReadList"><span class="hs-identifier hs-var hs-var hs-var hs-var">liftReadList</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; ReadS a) -&gt; ReadS [a] -&gt; ReadS [Sum f g a]
forall (f :: * -&gt; *) a.
Read1 f =&gt;
(Int -&gt; ReadS a) -&gt; ReadS [a] -&gt; ReadS [f a]
</span><a href="Data.Functor.Classes.html#liftReadListDefault"><span class="hs-identifier hs-var">liftReadListDefault</span></a></span></span></span><span>
</span><span id="line-59"></span><span>
</span><span id="line-60"></span><span class="hs-comment">-- | @since 4.9.0.0</span><span>
</span><span id="line-61"></span><span id="local-6989586621679580838"><span id="local-6989586621679580839"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679580522"><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Classes.html#Show1"><span class="hs-identifier hs-type">Show1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580839"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Functor.Classes.html#Show1"><span class="hs-identifier hs-type">Show1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580838"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Functor.Classes.html#Show1"><span class="hs-identifier hs-type">Show1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#Sum"><span class="hs-identifier hs-type">Sum</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580839"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580838"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-62"></span><span>    </span><span id="local-6989586621679580518"><span class="annot"><span class="annottext">liftShowsPrec :: forall a.
(Int -&gt; a -&gt; ShowS) -&gt; ([a] -&gt; ShowS) -&gt; Int -&gt; Sum f g a -&gt; ShowS
</span><a href="Data.Functor.Classes.html#liftShowsPrec"><span class="hs-identifier hs-var hs-var hs-var hs-var">liftShowsPrec</span></a></span></span><span> </span><span id="local-6989586621679580516"><span class="annot"><span class="annottext">Int -&gt; a -&gt; ShowS
</span><a href="#local-6989586621679580516"><span class="hs-identifier hs-var">sp</span></a></span></span><span> </span><span id="local-6989586621679580515"><span class="annot"><span class="annottext">[a] -&gt; ShowS
</span><a href="#local-6989586621679580515"><span class="hs-identifier hs-var">sl</span></a></span></span><span> </span><span id="local-6989586621679580514"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679580514"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#InL"><span class="hs-identifier hs-type">InL</span></a></span><span> </span><span id="local-6989586621679580513"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679580513"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-63"></span><span>        </span><span class="annot"><span class="annottext">(Int -&gt; f a -&gt; ShowS) -&gt; String -&gt; Int -&gt; f a -&gt; ShowS
forall a. (Int -&gt; a -&gt; ShowS) -&gt; String -&gt; Int -&gt; a -&gt; ShowS
</span><a href="Data.Functor.Classes.html#showsUnaryWith"><span class="hs-identifier hs-var">showsUnaryWith</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Int -&gt; a -&gt; ShowS) -&gt; ([a] -&gt; ShowS) -&gt; Int -&gt; f a -&gt; ShowS
forall (f :: * -&gt; *) a.
Show1 f =&gt;
(Int -&gt; a -&gt; ShowS) -&gt; ([a] -&gt; ShowS) -&gt; Int -&gt; f a -&gt; ShowS
</span><a href="Data.Functor.Classes.html#liftShowsPrec"><span class="hs-identifier hs-var">liftShowsPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; a -&gt; ShowS
</span><a href="#local-6989586621679580516"><span class="hs-identifier hs-var">sp</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; ShowS
</span><a href="#local-6989586621679580515"><span class="hs-identifier hs-var">sl</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;InL&quot;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679580514"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679580513"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-64"></span><span>    </span><span class="annot"><a href="Data.Functor.Classes.html#liftShowsPrec"><span class="hs-identifier hs-var">liftShowsPrec</span></a></span><span> </span><span id="local-6989586621679580511"><span class="annot"><span class="annottext">Int -&gt; a -&gt; ShowS
</span><a href="#local-6989586621679580511"><span class="hs-identifier hs-var">sp</span></a></span></span><span> </span><span id="local-6989586621679580510"><span class="annot"><span class="annottext">[a] -&gt; ShowS
</span><a href="#local-6989586621679580510"><span class="hs-identifier hs-var">sl</span></a></span></span><span> </span><span id="local-6989586621679580509"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679580509"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#InR"><span class="hs-identifier hs-type">InR</span></a></span><span> </span><span id="local-6989586621679580508"><span class="annot"><span class="annottext">g a
</span><a href="#local-6989586621679580508"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-65"></span><span>        </span><span class="annot"><span class="annottext">(Int -&gt; g a -&gt; ShowS) -&gt; String -&gt; Int -&gt; g a -&gt; ShowS
forall a. (Int -&gt; a -&gt; ShowS) -&gt; String -&gt; Int -&gt; a -&gt; ShowS
</span><a href="Data.Functor.Classes.html#showsUnaryWith"><span class="hs-identifier hs-var">showsUnaryWith</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Int -&gt; a -&gt; ShowS) -&gt; ([a] -&gt; ShowS) -&gt; Int -&gt; g a -&gt; ShowS
forall (f :: * -&gt; *) a.
Show1 f =&gt;
(Int -&gt; a -&gt; ShowS) -&gt; ([a] -&gt; ShowS) -&gt; Int -&gt; f a -&gt; ShowS
</span><a href="Data.Functor.Classes.html#liftShowsPrec"><span class="hs-identifier hs-var">liftShowsPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; a -&gt; ShowS
</span><a href="#local-6989586621679580511"><span class="hs-identifier hs-var">sp</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; ShowS
</span><a href="#local-6989586621679580510"><span class="hs-identifier hs-var">sl</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;InR&quot;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679580509"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">g a
</span><a href="#local-6989586621679580508"><span class="hs-identifier hs-var">y</span></a></span></span></span><span>
</span><span id="line-66"></span><span>
</span><span id="line-67"></span><span class="hs-comment">-- | @since 4.9.0.0</span><span>
</span><span id="line-68"></span><span id="local-6989586621679580832"><span id="local-6989586621679580833"><span id="local-6989586621679580834"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679580505"><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Classes.html#Eq1"><span class="hs-identifier hs-type">Eq1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580834"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Functor.Classes.html#Eq1"><span class="hs-identifier hs-type">Eq1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580833"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-type">Eq</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580832"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-type">Eq</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#Sum"><span class="hs-identifier hs-type">Sum</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580834"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580833"><span class="hs-identifier hs-type">g</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580832"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-69"></span><span>    </span><span id="local-6989586621679580501"><span class="annot"><span class="annottext">== :: Sum f g a -&gt; Sum f g a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var hs-var hs-var hs-var">(==)</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Sum f g a -&gt; Sum f g a -&gt; Bool
forall (f :: * -&gt; *) a. (Eq1 f, Eq a) =&gt; f a -&gt; f a -&gt; Bool
</span><a href="Data.Functor.Classes.html#eq1"><span class="hs-identifier hs-var">eq1</span></a></span></span></span></span><span>
</span><span id="line-70"></span><span class="hs-comment">-- | @since 4.9.0.0</span><span>
</span><span id="line-71"></span><span id="local-6989586621679580826"><span id="local-6989586621679580827"><span id="local-6989586621679580828"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679580485"><span id="local-6989586621679580487"><span id="local-6989586621679580489"><span id="local-6989586621679580491"><span id="local-6989586621679580493"><span id="local-6989586621679580495"><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Classes.html#Ord1"><span class="hs-identifier hs-type">Ord1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580828"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Functor.Classes.html#Ord1"><span class="hs-identifier hs-type">Ord1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580827"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Ord"><span class="hs-identifier hs-type">Ord</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580826"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Ord"><span class="hs-identifier hs-type">Ord</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#Sum"><span class="hs-identifier hs-type">Sum</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580828"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580827"><span class="hs-identifier hs-type">g</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580826"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span></span></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-72"></span><span>    </span><span id="local-6989586621679580481"><span class="annot"><span class="annottext">compare :: Sum f g a -&gt; Sum f g a -&gt; Ordering
</span><a href="../../ghc-prim/src/GHC.Classes.html#compare"><span class="hs-identifier hs-var hs-var hs-var hs-var">compare</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Sum f g a -&gt; Sum f g a -&gt; Ordering
forall (f :: * -&gt; *) a. (Ord1 f, Ord a) =&gt; f a -&gt; f a -&gt; Ordering
</span><a href="Data.Functor.Classes.html#compare1"><span class="hs-identifier hs-var">compare1</span></a></span></span></span></span><span>
</span><span id="line-73"></span><span class="hs-comment">-- | @since 4.9.0.0</span><span>
</span><span id="line-74"></span><span id="local-6989586621679580820"><span id="local-6989586621679580821"><span id="local-6989586621679580822"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679580477"><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Classes.html#Read1"><span class="hs-identifier hs-type">Read1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580822"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Functor.Classes.html#Read1"><span class="hs-identifier hs-type">Read1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580821"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Read.html#Read"><span class="hs-identifier hs-type">Read</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580820"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Read.html#Read"><span class="hs-identifier hs-type">Read</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#Sum"><span class="hs-identifier hs-type">Sum</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580822"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580821"><span class="hs-identifier hs-type">g</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580820"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-75"></span><span>    </span><span id="local-6989586621679580470"><span class="annot"><span class="annottext">readPrec :: ReadPrec (Sum f g a)
</span><a href="GHC.Read.html#readPrec"><span class="hs-identifier hs-var hs-var hs-var hs-var">readPrec</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ReadPrec (Sum f g a)
forall (f :: * -&gt; *) a. (Read1 f, Read a) =&gt; ReadPrec (f a)
</span><a href="Data.Functor.Classes.html#readPrec1"><span class="hs-identifier hs-var">readPrec1</span></a></span><span>
</span><span id="line-76"></span><span>
</span><span id="line-77"></span><span>    </span><span id="local-6989586621679580466"><span class="annot"><span class="annottext">readListPrec :: ReadPrec [Sum f g a]
</span><a href="GHC.Read.html#readListPrec"><span class="hs-identifier hs-var hs-var hs-var hs-var">readListPrec</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ReadPrec [Sum f g a]
forall a. Read a =&gt; ReadPrec [a]
</span><a href="GHC.Read.html#readListPrecDefault"><span class="hs-identifier hs-var">readListPrecDefault</span></a></span><span>
</span><span id="line-78"></span><span>    </span><span id="local-6989586621679580463"><span class="annot"><span class="annottext">readList :: ReadS [Sum f g a]
</span><a href="GHC.Read.html#readList"><span class="hs-identifier hs-var hs-var hs-var hs-var">readList</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ReadS [Sum f g a]
forall a. Read a =&gt; ReadS [a]
</span><a href="GHC.Read.html#readListDefault"><span class="hs-identifier hs-var">readListDefault</span></a></span></span></span></span><span>
</span><span id="line-79"></span><span class="hs-comment">-- | @since 4.9.0.0</span><span>
</span><span id="line-80"></span><span id="local-6989586621679580812"><span id="local-6989586621679580813"><span id="local-6989586621679580814"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679580457"><span id="local-6989586621679580459"><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Classes.html#Show1"><span class="hs-identifier hs-type">Show1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580814"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Functor.Classes.html#Show1"><span class="hs-identifier hs-type">Show1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580813"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580812"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#Sum"><span class="hs-identifier hs-type">Sum</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580814"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580813"><span class="hs-identifier hs-type">g</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580812"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-81"></span><span>    </span><span id="local-6989586621679580453"><span class="annot"><span class="annottext">showsPrec :: Int -&gt; Sum f g a -&gt; ShowS
</span><a href="GHC.Show.html#showsPrec"><span class="hs-identifier hs-var hs-var hs-var hs-var">showsPrec</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Sum f g a -&gt; ShowS
forall (f :: * -&gt; *) a. (Show1 f, Show a) =&gt; Int -&gt; f a -&gt; ShowS
</span><a href="Data.Functor.Classes.html#showsPrec1"><span class="hs-identifier hs-var">showsPrec1</span></a></span></span></span></span><span>
</span><span id="line-82"></span><span>
</span><span id="line-83"></span><span class="hs-comment">-- | @since 4.9.0.0</span><span>
</span><span id="line-84"></span><span id="local-6989586621679580801"><span id="local-6989586621679580802"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Base.html#Functor"><span class="hs-identifier hs-type">Functor</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580802"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#Functor"><span class="hs-identifier hs-type">Functor</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580801"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#Functor"><span class="hs-identifier hs-type">Functor</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#Sum"><span class="hs-identifier hs-type">Sum</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580802"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580801"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-85"></span><span>    </span><span id="local-6989586621679580442"><span class="annot"><span class="annottext">fmap :: forall a b. (a -&gt; b) -&gt; Sum f g a -&gt; Sum f g b
</span><a href="GHC.Base.html#fmap"><span class="hs-identifier hs-var hs-var hs-var hs-var">fmap</span></a></span></span><span> </span><span id="local-6989586621679580441"><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679580441"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#InL"><span class="hs-identifier hs-type">InL</span></a></span><span> </span><span id="local-6989586621679580440"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679580440"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">f b -&gt; Sum f g b
forall {k} (f :: k -&gt; *) (g :: k -&gt; *) (a :: k). f a -&gt; Sum f g a
</span><a href="Data.Functor.Sum.html#InL"><span class="hs-identifier hs-var">InL</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; b) -&gt; f a -&gt; f b
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679580441"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679580440"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-86"></span><span>    </span><span class="annot"><a href="GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span id="local-6989586621679580439"><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679580439"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#InR"><span class="hs-identifier hs-type">InR</span></a></span><span> </span><span id="local-6989586621679580438"><span class="annot"><span class="annottext">g a
</span><a href="#local-6989586621679580438"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">g b -&gt; Sum f g b
forall {k} (f :: k -&gt; *) (g :: k -&gt; *) (a :: k). g a -&gt; Sum f g a
</span><a href="Data.Functor.Sum.html#InR"><span class="hs-identifier hs-var">InR</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; b) -&gt; g a -&gt; g b
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679580439"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">g a
</span><a href="#local-6989586621679580438"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-87"></span><span>
</span><span id="line-88"></span><span>    </span><span id="local-6989586621679580435"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679580435"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679580434"><span class="annot"><span class="annottext">&lt;$ :: forall a b. a -&gt; Sum f g b -&gt; Sum f g a
</span><a href="GHC.Base.html#%3C%24"><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;$</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#InL"><span class="hs-identifier hs-type">InL</span></a></span><span> </span><span id="local-6989586621679580432"><span class="annot"><span class="annottext">f b
</span><a href="#local-6989586621679580432"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">f a -&gt; Sum f g a
forall {k} (f :: k -&gt; *) (g :: k -&gt; *) (a :: k). f a -&gt; Sum f g a
</span><a href="Data.Functor.Sum.html#InL"><span class="hs-identifier hs-var">InL</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679580435"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; f b -&gt; f a
forall (f :: * -&gt; *) a b. Functor f =&gt; a -&gt; f b -&gt; f a
</span><a href="GHC.Base.html#%3C%24"><span class="hs-operator hs-var">&lt;$</span></a></span><span> </span><span class="annot"><span class="annottext">f b
</span><a href="#local-6989586621679580432"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-89"></span><span>    </span><span id="local-6989586621679580431"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679580431"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="annot"><a href="GHC.Base.html#%3C%24"><span class="hs-operator hs-var">&lt;$</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#InR"><span class="hs-identifier hs-type">InR</span></a></span><span> </span><span id="local-6989586621679580430"><span class="annot"><span class="annottext">g b
</span><a href="#local-6989586621679580430"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">g a -&gt; Sum f g a
forall {k} (f :: k -&gt; *) (g :: k -&gt; *) (a :: k). g a -&gt; Sum f g a
</span><a href="Data.Functor.Sum.html#InR"><span class="hs-identifier hs-var">InR</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679580431"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; g b -&gt; g a
forall (f :: * -&gt; *) a b. Functor f =&gt; a -&gt; f b -&gt; f a
</span><a href="GHC.Base.html#%3C%24"><span class="hs-operator hs-var">&lt;$</span></a></span><span> </span><span class="annot"><span class="annottext">g b
</span><a href="#local-6989586621679580430"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-90"></span><span>
</span><span id="line-91"></span><span class="hs-comment">-- | @since 4.9.0.0</span><span>
</span><span id="line-92"></span><span id="local-6989586621679580780"><span id="local-6989586621679580781"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679580397"><span id="local-6989586621679580399"><span id="local-6989586621679580401"><span id="local-6989586621679580403"><span id="local-6989586621679580405"><span id="local-6989586621679580407"><span id="local-6989586621679580409"><span id="local-6989586621679580411"><span id="local-6989586621679580413"><span id="local-6989586621679580415"><span id="local-6989586621679580417"><span id="local-6989586621679580419"><span id="local-6989586621679580421"><span id="local-6989586621679580423"><span id="local-6989586621679580425"><span id="local-6989586621679580428"><span class="hs-special">(</span><span class="annot"><a href="Data.Foldable.html#Foldable"><span class="hs-identifier hs-type">Foldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580781"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Foldable.html#Foldable"><span class="hs-identifier hs-type">Foldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580780"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Foldable.html#Foldable"><span class="hs-identifier hs-type">Foldable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#Sum"><span class="hs-identifier hs-type">Sum</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580781"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580780"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-93"></span><span>    </span><span id="local-6989586621679580390"><span class="annot"><span class="annottext">foldMap :: forall m a. Monoid m =&gt; (a -&gt; m) -&gt; Sum f g a -&gt; m
</span><a href="Data.Foldable.html#foldMap"><span class="hs-identifier hs-var hs-var hs-var hs-var">foldMap</span></a></span></span><span> </span><span id="local-6989586621679580388"><span class="annot"><span class="annottext">a -&gt; m
</span><a href="#local-6989586621679580388"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#InL"><span class="hs-identifier hs-type">InL</span></a></span><span> </span><span id="local-6989586621679580387"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679580387"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; m) -&gt; f a -&gt; m
forall (t :: * -&gt; *) m a.
(Foldable t, Monoid m) =&gt;
(a -&gt; m) -&gt; t a -&gt; m
</span><a href="Data.Foldable.html#foldMap"><span class="hs-identifier hs-var">foldMap</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; m
</span><a href="#local-6989586621679580388"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679580387"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-94"></span><span>    </span><span class="annot"><a href="Data.Foldable.html#foldMap"><span class="hs-identifier hs-var">foldMap</span></a></span><span> </span><span id="local-6989586621679580386"><span class="annot"><span class="annottext">a -&gt; m
</span><a href="#local-6989586621679580386"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#InR"><span class="hs-identifier hs-type">InR</span></a></span><span> </span><span id="local-6989586621679580385"><span class="annot"><span class="annottext">g a
</span><a href="#local-6989586621679580385"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; m) -&gt; g a -&gt; m
forall (t :: * -&gt; *) m a.
(Foldable t, Monoid m) =&gt;
(a -&gt; m) -&gt; t a -&gt; m
</span><a href="Data.Foldable.html#foldMap"><span class="hs-identifier hs-var">foldMap</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; m
</span><a href="#local-6989586621679580386"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">g a
</span><a href="#local-6989586621679580385"><span class="hs-identifier hs-var">y</span></a></span></span></span><span>
</span><span id="line-95"></span><span>
</span><span id="line-96"></span><span class="hs-comment">-- | @since 4.9.0.0</span><span>
</span><span id="line-97"></span><span id="local-6989586621679580765"><span id="local-6989586621679580766"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679580374"><span id="local-6989586621679580376"><span id="local-6989586621679580378"><span class="hs-special">(</span><span class="annot"><a href="Data.Traversable.html#Traversable"><span class="hs-identifier hs-type">Traversable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580766"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Traversable.html#Traversable"><span class="hs-identifier hs-type">Traversable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580765"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Traversable.html#Traversable"><span class="hs-identifier hs-type">Traversable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#Sum"><span class="hs-identifier hs-type">Sum</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580766"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679580765"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-98"></span><span>    </span><span id="local-6989586621679580363"><span class="annot"><span class="annottext">traverse :: forall (f :: * -&gt; *) a b.
Applicative f =&gt;
(a -&gt; f b) -&gt; Sum f g a -&gt; f (Sum f g b)
</span><a href="Data.Traversable.html#traverse"><span class="hs-identifier hs-var hs-var hs-var hs-var">traverse</span></a></span></span><span> </span><span id="local-6989586621679580361"><span class="annot"><span class="annottext">a -&gt; f b
</span><a href="#local-6989586621679580361"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#InL"><span class="hs-identifier hs-type">InL</span></a></span><span> </span><span id="local-6989586621679580360"><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679580360"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">f b -&gt; Sum f g b
forall {k} (f :: k -&gt; *) (g :: k -&gt; *) (a :: k). f a -&gt; Sum f g a
</span><a href="Data.Functor.Sum.html#InL"><span class="hs-identifier hs-var">InL</span></a></span><span> </span><span class="annot"><span class="annottext">(f b -&gt; Sum f g b) -&gt; f (f b) -&gt; f (Sum f g b)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; f b) -&gt; f a -&gt; f (f b)
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; f b
</span><a href="#local-6989586621679580361"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">f a
</span><a href="#local-6989586621679580360"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-99"></span><span>    </span><span class="annot"><a href="Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span> </span><span id="local-6989586621679580358"><span class="annot"><span class="annottext">a -&gt; f b
</span><a href="#local-6989586621679580358"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Functor.Sum.html#InR"><span class="hs-identifier hs-type">InR</span></a></span><span> </span><span id="local-6989586621679580357"><span class="annot"><span class="annottext">g a
</span><a href="#local-6989586621679580357"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">g b -&gt; Sum f g b
forall {k} (f :: k -&gt; *) (g :: k -&gt; *) (a :: k). g a -&gt; Sum f g a
</span><a href="Data.Functor.Sum.html#InR"><span class="hs-identifier hs-var">InR</span></a></span><span> </span><span class="annot"><span class="annottext">(g b -&gt; Sum f g b) -&gt; f (g b) -&gt; f (Sum f g b)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; f b) -&gt; g a -&gt; f (g b)
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; f b
</span><a href="#local-6989586621679580358"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">g a
</span><a href="#local-6989586621679580357"><span class="hs-identifier hs-var">y</span></a></span></span></span><span>
</span><span id="line-100"></span></pre></body></html>